home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
1997.ZIP
/
INPFLD10.ARC
/
READCHAR.C
< prev
next >
Wrap
Text File
|
1987-07-24
|
502b
|
17 lines
/* ------------------------------------------------------------ */
/* readchar - Get a character from the keyboard. Returns an */
/* integer from 0 to 512. Double keys have 256 added to */
/* them, e.g., F1 (0 59) returns 315 (59 + 256) */
/* M. Burton 20 Jul 87 Written for TurboC V1.0 */
/* ------------------------------------------------------------ */
#include <stdio.h>
int readchar()
{
char ch;
if (!(ch = getch()))
return((ch = getch()) + 256);
return(ch);
}